import { defineStore } from "pinia";
import { ref } from "vue";

export const useUserStore =defineStore(
    'user',()=>{
     // 定义 state
     const token = ref<string | null>(null)
     // 记得return
     return {token}
},
{
    // 指定存储
    unistorage: {
      key: 'cp-patient-user',
      paths: ['token'],
    }
  }
)